package javajs;

public class Person {
  private int age;
  public void setAge() {

      if (age < 0 || age > 150) {

          System.out.println("该年龄段不合法");

      } else {

          this.age = age;

      }
  }
}
